﻿<Window x:Class="FrontDisplay.ParametersWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:loc="clr-namespace:FrontDisplay.Localization"
    xmlns:local="clr-namespace:FrontDisplay.Controls"
    Title="{loc:Translate Key=Global.Parameters, IsAutoUpdate=true}" MinWidth="300" MinHeight="300" Width="450" Height="450" WindowStartupLocation="CenterScreen">
    <Window.Resources>
        <ResourceDictionary Source="../Themes/DialogWindow.xaml"></ResourceDictionary>
    </Window.Resources>
    <DockPanel Background="{x:Static SystemColors.ControlBrush}">
        <StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal" HorizontalAlignment="Right">
            <Button IsDefault="True" Click="OkClick" Style="{StaticResource Button}">
                <TextBlock Text="{loc:Translate Key=Global.OK, IsAutoUpdate=true}"></TextBlock>
            </Button>
            <Button IsCancel="True" Click="CancelClick" Style="{StaticResource Button}">
                <TextBlock Text="{loc:Translate Key=Global.Cancel, IsAutoUpdate=true}"></TextBlock>
            </Button>
            <Button x:Name="ApplyButton" Click="ApplyClick" Style="{StaticResource Button}">
                <TextBlock Text="{loc:Translate Key=Global.Apply, IsAutoUpdate=true}"></TextBlock>
            </Button>
        </StackPanel>
        <TabControl x:Name="TabControl">
            <TabItem Header="{loc:Translate Key=Options.Appearance.Appearance, IsAutoUpdate=true}">
                <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
                    <Grid Margin="4">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="auto" MinHeight="29" />
                            <RowDefinition Height="auto" MinHeight="29" />
                            <RowDefinition Height="auto" MinHeight="23" />
                            <RowDefinition Height="auto" MinHeight="27" />
                            <RowDefinition Height="auto" MinHeight="29" />
                            <RowDefinition Height="auto" MinHeight="29" />
                            <RowDefinition Height="auto" MinHeight="21" />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="40*" />
                            <ColumnDefinition Width="60*" />
                        </Grid.ColumnDefinitions>

                        <Label Grid.Column="0" Grid.Row="0">
                            <TextBlock x:Name="test" Text="{loc:Translate Key=Options.Appearance.Theme, IsAutoUpdate=true}"></TextBlock>
                        </Label>
                        <ComboBox x:Name="ThemeComboBox" Grid.Column="1" Grid.Row="0" SelectionChanged="ThemeComboBoxSelectionChanged"></ComboBox>

                        <Label Grid.Row="1">
                            <TextBlock Text="{loc:Translate Key=Options.Appearance.Background, IsAutoUpdate=true}"></TextBlock>
                        </Label>
                        <ComboBox x:Name="BackgroundComboBox" Grid.Column="1" Grid.Row="1"></ComboBox>

                        <Expander Grid.ColumnSpan="2" Grid.Row="2" IsExpanded="False" VerticalContentAlignment="Stretch" ExpandDirection="Down"
                              Header="{loc:Translate Key=Options.Appearance.EditTheme, IsAutoUpdate=true}" x:Name="themeExpander">
                            <Grid Margin="4">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="30" />
                                    <RowDefinition Height="30" />
                                    <RowDefinition Height="30" />
                                    <RowDefinition Height="30" />
                                    <RowDefinition Height="30" />
                                    <RowDefinition Height="30" />
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="40*" />
                                    <ColumnDefinition Width="60*" />
                                </Grid.ColumnDefinitions>
                                <Label>
                                    <TextBlock Text="{loc:Translate Key=Options.Appearance.ThemeName, IsAutoUpdate=true}"></TextBlock>
                                </Label>
                                <TextBox x:Name="themeNameTextbox" Grid.Column="1"></TextBox>

                                <Label Grid.Row="1">
                                    <TextBlock Text="{loc:Translate Key=Options.Appearance.TextColor, IsAutoUpdate=true}"></TextBlock>
                                </Label>
                                <local:ComboColorPicker Grid.Row="1" Grid.Column="1" x:Name="textColor" Padding="4,0,4,0" />

                                <Label Grid.Row="2">
                                    <TextBlock Text="{loc:Translate Key=Options.Appearance.TextShadowColor, IsAutoUpdate=true}"></TextBlock>
                                </Label>
                                <local:ComboColorPicker Grid.Row="2" Grid.Column="1" x:Name="shadowColor" Padding="4,0,4,0" />

                                <Label Grid.Row="3">
                                    <TextBlock Text="{loc:Translate Key=Options.Appearance.BackgroundTopColor, IsAutoUpdate=true}"></TextBlock>
                                </Label>
                                <local:ComboColorPicker Grid.Row="3" Grid.Column="1" x:Name="backTopColor" Padding="4,0,4,0" />

                                <Label Grid.Row="4">
                                    <TextBlock Text="{loc:Translate Key=Options.Appearance.BackgroundColor, IsAutoUpdate=true}"></TextBlock>
                                </Label>
                                <local:ComboColorPicker Grid.Row="4" Grid.Column="1" x:Name="backColor" Padding="4,0,4,0" />

                                <Label Grid.Row="5">
                                    <TextBlock Text="{loc:Translate Key=Options.Appearance.BackgroundBottomColor, IsAutoUpdate=true}"></TextBlock>
                                </Label>
                                <local:ComboColorPicker Grid.Row="5" Grid.Column="1" x:Name="backBottomColor" Padding="4,0,4,0" />
                            </Grid>
                        </Expander>

                        <StackPanel Orientation="Horizontal" Grid.ColumnSpan="2" Grid.Row="3" >
                            <CheckBox x:Name="IsAutoChangeThemeCheckBox" HorizontalAlignment="Stretch">
                                <TextBlock Text="{loc:Translate Key=Options.Appearance.AutoChangeColorTheme, IsAutoUpdate=true}"></TextBlock>
                            </CheckBox>
                            <TextBox x:Name="ChangeThemeIntervalTextBox" Width="40" MaxLength="4" HorizontalAlignment="Left" IsEnabled="{Binding ElementName=IsAutoChangeThemeCheckBox, Path=IsChecked}" />
                            <TextBlock VerticalAlignment="Center" Text="{loc:Translate Key=Options.Appearance.ThemeChangeIntervalInSeconds, IsAutoUpdate=true}"></TextBlock>
                        </StackPanel>

                        <Label Grid.Column="0" Grid.Row="4">
                            <TextBlock Text="{loc:Translate Key=Options.Appearance.DisplayOnMonitor, IsAutoUpdate=true}"></TextBlock>
                        </Label>
                        <ComboBox x:Name="MonitorComboBox" Grid.Column="1" Grid.Row="4" IsEnabled="{Binding ElementName=IsFullScreenCheckBox, Path=IsChecked}"></ComboBox>

                        <Label Grid.Column="0" Grid.Row="5">
                            <TextBlock Text="{loc:Translate Key=Options.Appearance.Language, IsAutoUpdate=true}"></TextBlock>
                        </Label>
                        <ComboBox x:Name="LanguageComboBox" Grid.Column="1" Grid.Row="5"></ComboBox>

                        <CheckBox x:Name="InterceptMouseCheckBox" Grid.ColumnSpan="2" Grid.Row="6" Visibility="Collapsed">
                            <TextBlock Text="{loc:Translate Key=Options.Appearance.IntercepntMouseEvents, IsAutoUpdate=true}"></TextBlock>
                        </CheckBox>
                    </Grid>
                </ScrollViewer>
            </TabItem>
        </TabControl>
    </DockPanel>
</Window>
